<template>
  <el-form :model="integralGradeModel">
    <el-form-item label-width="100px" label="借款额度">
      <el-col :span="16"
        > <el-input-number v-model="integralGradeModel.borrowAmount" :min="0"
      /></el-col>
    </el-form-item>
    <el-form-item label-width="100px" label="积分区间开始">
      <el-col :span="16"
        > <el-input-number v-model="integralGradeModel.integralStart" :min="0"
      /></el-col>
    </el-form-item>
    <el-form-item label-width="100px" label="积分区间结束">
      <el-col :span="16"
        > <el-input-number v-model="integralGradeModel.integralEnd" :min="0"
      /></el-col>
    </el-form-item>
    <el-button size="mini" type="danger" @click="add()">新增</el-button>
  </el-form>
</template>

<script>
import { save } from "@/api/integralGrade";
export default {
  data() {
    return {
      integralGradeModel: {
        borrowAmount: 0,
        integralStart: 0,
        integralEnd: 0,
      },
    };
  },
  methods: {
    add() {
      save(this.integralGradeModel)
        .then((response) => {
          this.$message.success(response.data.message);
        })
        .catch((error) => {
          console.log("新增失败！", error);
        });
      this.$router.push("/integralList");
    },
  },
};
</script>

<style>
</style>

